<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>component-1</title>
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
  <h1>component-1</h1>
  <hr>
  <div id="app">
   <adam1></adam1>
   <adam2></adam2>
  </div>
  
  <script type="text/javascript">
  Vue.component('adam1',{
    template:`<div style="color:red">我是全局的组件 adam1</div>`
  })
  var app = new Vue({
    el:'#app',
    components:{
      "adam2":{
        template:`<div style="color:red">我是局部的组件 adam2</div>`
      }
    }
    
  })
  
  </script>
</body>
</html>